<template>
  <div>
    <el-checkbox-group v-if="checkList && checkList.length > 0" v-model="dataForm[attrName]">
      <el-checkbox v-for="(item, index) in checkList" :border="border" :key="index" :label="R.prop(labelAttr, item)">
        {{ R.prop(textAttr, item)}}
      </el-checkbox>
    </el-checkbox-group>
    <span v-else>
      没有备选项
    </span>
  </div>

</template>

<script>
import basicMixins from './basicMixins'

export default {
  name: 'checkboxGroup',
  props: ['checkList', 'border', 'labelAttr', 'textAttr'],
  mixins: [basicMixins]
}
</script>

<style scoped>

</style>
